<!DOCTYPE html>
<html th:replace="layout/layout"
      xmlns:th="http://www.thymeleaf.org">
<title th:fragment="titleName">功能管理</title>
<style th:fragment="styles">
</style>
<div id="customModule" th:fragment="content">
    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-lg-10">
            <h2>功能管理</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="/index?menuId=1">首页</a>
                </li>
                <li>
                    <a>权限管理</a>
                </li>
                <li class="active">
                    <strong>功能管理</strong>
                </li>
            </ol>
        </div>
        <div class="col-lg-2">

        </div>
    </div>
    <div class="wrapper wrapper-content  animated fadeInRight">
        <div class="row">
            <div class="col-lg-12">
                <div class="ibox ">
                    <div class="ibox-title">
                        <h5>功能列表</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                            <div class="col-lg-4">
                                <div class="form-group">
                                    <input autocomplete="off" class="form-control" id="funNameCondition"
                                           name="funNameCondition"
                                           placeholder="功能描述"
                                           type="text" v-model="funNameCondition">
                                </div>
                            </div>
                            <div class="col-lg-4">
                                <div class="form-group">
                                    <input autocomplete="off" class="form-control" id="menuNameCondition"
                                           name="menuNameCondition"
                                           placeholder="菜单名称"
                                           type="text" v-model="menuNameCondition">
                                </div>
                            </div>
                            <div class="col-lg-2">
                                <div class="form-group">
                                    <select class="form-control" id='activityCondition' name='activityCondition'
                                            v-model="activityCondition">
                                        <option value="-1">--全部状态--</option>
                                        <option value="1">已激活</option>
                                        <option value="0">未激活</option>
                                    </select>
                                </div>
                            </div>
                            <div class="col-lg-2">
                                <button @click="search()" class="btn btn-primary  btn-rounded  btn-sm" id="search"
                                        type="submit"><i
                                        class="fa fa-search"></i>&nbsp;搜索
                                </button>
                                <button @click="reset()" class="btn btn-warning  btn-rounded  btn-sm" id="refresh"
                                        type="submit"><i
                                        class="fa fa-refresh"></i>&nbsp;重置
                                </button>
                            </div>
                        </div>
                        <div class="jqGrid_wrapper">
                            <div class="btn-group-sm" id="toolbar" role="group">
                                <a @click="addRecord();" class="btn btn-success" data-toggle="modal"
                                   id="AddNew" name="AddNew">
                                    <i class="fa fa-plus"></i> 新增
                                </a>
                                <!--<a class="btn btn-primary single disabled">-->
                                <!--<i class="fa fa-edit"></i> 修改-->
                                <!--</a>-->
                                <!--<a class="btn btn-danger multiple disabled">-->
                                <!--<i class="fa fa-remove"></i> 删除-->
                                <!--</a>-->
                            </div>

                            <table class="table table-striped table-bordered table-hover " id="tableList">
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--模态框-->
    <div aria-hidden="true" class="modal inmodal" id="myModalAdd" role="dialog" tabindex="-1">
        <div class="modal-dialog  modal-lg">
            <div class="modal-content animated bounceInRight">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal" type="button"><span
                            aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title">功能信息</h4>
                </div>
                <div class="modal-body">
                    <!--@*模态框body*@-->
                    <div class="tabs-container">
                        <div class="panel-body form-horizontal">
                            <form class="form-horizontal" id="myform">
                                <div class="row">
                                    <label class="col-lg-2 control-label">选择角色</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <select class="form-control" v-model="roleChecked">
                                                <option :value="item.id" v-for="(item,index) in roleList">
                                                    {{item.name}}
                                                </option>
                                            </select>
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">功能描述</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input autocomplete="off" class="form-control" id="buttonDescription"
                                                   maxlength="20" name="buttonDescription" placeholder="功能描述"
                                                   type="text" v-model="buttonDescription">
                                        </div>
                                    </div>

                                </div>
                                <div class="row">
                                    <label class="col-lg-2 control-label">菜单编号</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input autocomplete="off" class="form-control" id="menuID" maxlength="50"
                                                   name="menuID" placeholder="菜单编号" type="text" v-model="menuID">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">菜单名称</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input autocomplete="off" class="form-control" id="menuName" maxlength="50"
                                                   name="menuName" placeholder="菜单名称" type="text"
                                                   v-model="menuName">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-lg-2 control-label">是否激活</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <select class="form-control" id='activity' name='activity'
                                                    v-model="activity">
                                                <option value="1">激活</option>
                                                <option value="0">未激活</option>
                                            </select>
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">逻辑key</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input autocomplete="off" class="form-control" id="enDesc" maxlength="50"
                                                   name="enDesc" placeholder="逻辑key" type="text" v-model="enDesc">
                                        </div>
                                    </div>
                                </div>

                            </form>
                        </div>
                    </div>

                    <!--模态框body结束-->
                </div>
                <div class="modal-footer">
                    <button @click="saveRecord();" class="btn btn-success" id="save" name="save" type="button"><i
                            class="fa fa-save"></i>&nbsp;保存
                    </button>
                    <button class="btn btn-danger" data-dismiss="modal" id="close" name="close" type="button"><i
                            class="fa fa-close"></i>&nbsp;关 闭
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:fragment="scriptRef">
    <script th:src="@{/js/button/button.js}"></script>
</div>

<script th:fragment="scripts" type="text/javascript">
    Button.init();
</script>
</html>